php forum
php mysql forum
php mysql smarty
 
Topic Options
#277231 - 07/25/04 01:34 PM Finished-[6.3] Search fix
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
Mod Name / Version: Search fix <br /> <br />Description: This allows search 'By Display Name' to function (it was busted and returned no results). <br /> <br />Working Under: UBB.Threads 6.3 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: <br /> <br />Author(s): Twisty <br /> <br />Date: 07/25/04 <br /> <br />Credits: <br /> <br />Files Altered: <br /> <br />dosearch.php <br />templates/search.tmpl (optional) <br /> <br />New Files: <br /> <br />Database Altered: no <br /> <br />Info/Instructions: In dosearch.php... <br /> <br />CHANGE THIS: <br /> <br />
Code:
// ------------------------------------------------------------------------- <br />// If we are searching for all posts by a user we need to know their username <br />	if ($Match == "Username") { <br />      $where = "U_Number = '$Words'";
<br /> <br />TO THIS: <br /> <br />
Code:
// ------------------------------------------------------------------------- <br />// If we are searching for all posts by a user we need to know their username <br />	if ($Match == "Username") { <br />      $where = "U_Username = '$Words'";
<br /> <br /> <br />OPTIONAL: <br /> <br />I also recommend removing the 'By username' entry box from search.php since it appears to be entirely redundant to the 'Words to search for' entry box, and mimics it's behaviour in an identical manner (not to mention causes extra confusion)... <br /> <br />In templates/search.tmpl... <br /> <br />CHANGE THIS: <br /> <br />
Code:
{$ubbt_lang['SEARCH_WORDS']}&lt;br /&gt; <br />&lt;input type="text" name = "Words" size="30" class="formboxes" /&gt; <br />&lt;br /&gt; <br />&lt;br /&gt; <br />By username&lt;br&gt; <br />&lt;input type="text" name = "byuser" size="30" class="formboxes" /&gt; <br />&lt;br /&gt; <br />&lt;br /&gt;
<br /> <br />TO THIS: <br /> <br />
Code:
{$ubbt_lang['SEARCH_WORDS']}&lt;br /&gt; <br />&lt;input type="text" name = "Words" size="30" class="formboxes" /&gt; <br />&lt;br /&gt; <br />&lt;br /&gt;
<br /> <br /> <br />:-) <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.

Top
#277232 - 07/27/04 05:28 AM Re: Finished-[6.3] Search fix [Re: smoknz28]
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
Whoops, we're not quite done here. <br /> <br />I just realized that this now causes the 'Show all user's posts' link on the profile page to no longer return any results. The fix is simple however (in order to have both work). <br /> <br />In addition to the changes in my initial post, also do the following... <br /> <br />In showprofile.tmpl... <br /> <br />CHANGE THIS: <br /> <br />
Code:
&lt;a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&amp;amp;Forum=All_Forums&amp;amp;Words=$User&amp;amp;Match=Username&amp;amp;Searchpage=0&amp;amp;Limit=25&amp;amp;Old=allposts"&gt; <br />{$ubbt_lang['SHOW_ALL_P']}&lt;/a&gt;  
<br /> <br />TO THIS: <br /> <br />
Code:
&lt;a href="{$config['phpurl']}/dosearch.php?Cat=$Cat&amp;amp;Forum=All_Forums&amp;amp;Words=$CheckUser&amp;amp;Match=Username&amp;amp;Searchpage=0&amp;amp;Limit=25&amp;amp;Old=allposts"&gt; <br />{$ubbt_lang['SHOW_ALL_P']}&lt;/a&gt;  
_________________________
Twisty []http://www.mameworld.info/misc/nana2.gif[/]
MAMEWorld

Top
#277233 - 08/12/04 07:45 AM Re: Finished-[6.3] Search fix [Re: smoknz28]
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
Ugh, ok I promise that this is the last update to this mod <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /> <br /> <br />In additional to the 2 steps above, you'll also need to make this change: <br /> <br /> <br />In admin/selectoption.php... <br /> <br />CHANGE THIS: <br /> <br />
Code:
echo " <br />&lt;tr&gt;&lt;td class=lighttable valign=top&gt;&lt;span class=\"link\"&gt;&lt;a href=\"{$config['phpurl']}/dosearch.php?Cat=&amp;Forum=All_Forums&amp;Words=$User&amp;Match=Username&amp;Searchpage=0&amp;Limit=25&amp;Old=allposts\" target=\"_blank\"&gt;Show all User's Posts&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;
<br /> <br />TO THIS: <br /> <br />
Code:
echo " <br />&lt;tr&gt;&lt;td class=lighttable valign=top&gt;&lt;span class=\"link\"&gt;&lt;a href=\"{$config['phpurl']}/dosearch.php?Cat=&amp;Forum=All_Forums&amp;Words=$workuser&amp;Match=Username&amp;Searchpage=0&amp;Limit=25&amp;Old=allposts\" target=\"_blank\"&gt;Show all User's Posts&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;

Top



Moderator:  Ian_W 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks